<template>
	<view>
		<u-navbar :is-back="false" title="" :border-bottom="false">
			<view class="slot-wrap">
				<view class="back" @click="navTo('back')">
					<view class="iconfont iconfanhui" :style="{'padding-top': paddingTop}"></view>
					<view class="text">返回</view>
				</view>
				<view class="set">关于安瑞律师</view>
			</view>
		</u-navbar>
		<view class="app-img">
			<image class="img" src="../../static/login_an.png" mode=""></image>
			<view class="name">安瑞律师</view>
			<view class="version">版本&nbsp; {{ version }}</view>
		</view>
		<view class="content">
			<!-- <view class="item" @click="navTo('update')">
				<view class="left">检查更新</view>
				<view class="right">
					<view></view>
					<view class="iconfont icongengduo"></view>
				</view>
			</view> -->
			<view class="item" @click="navTo(0)">
				<view class="left">用户协议</view>
				<view class="right">
					<view></view>
					<view class="iconfont icongengduo"></view>
				</view>
			</view>
			<view class="item" @click="navTo(1)" style="margin-top: 16rpx;">
				<view class="left">隐私协议</view>
				<view class="right">
					<view></view>
					<view class="iconfont icongengduo"></view>
				</view>
			</view>
		</view>
		<view class="copyright">
			<view>Copyright ©2015-2020 浙江安瑞律师事务所</view>
			<view style="margin-top: 10rpx;"> All Rights Reserved.</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				paddingTop: '2rpx',
				version: '1.0.0'
			}
		},
		onLoad() {
			if(uni.getSystemInfoSync().platform != "ios") {
				this.paddingTop = '8rpx'
			}
			// #ifdef APP-PLUS
			console.log(plus.runtime.version)
			this.version = plus.runtime.version
			// #endif
		},
		methods: {
			navTo(data) {
				if (data === 'back') {
					uni.navigateBack()
				} else if (data === 0) {
					uni.navigateTo({url: '/pages/user/privacy?privacy=0'})
				} else if (data === 1) {
					uni.navigateTo({url: '/pages/user/privacy?privacy=1'})
				}
				
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f9f9f9;
	}
	.slot-wrap {
		display: flex;
		align-items: center;
		flex: 1;
		padding: 0 30rpx;
		.back {
			display: flex;
			font-size: 32rpx;
			.iconfanhui {
				font-weight: bold;
				font-size: 36rpx;
				padding-top: 8rpx;
			}
		}
		.set {
			display: flex;
			margin-left: 26%;
			font-weight: bold;
			font-size: 32rpx;
		}
	}
	.app-img {
		text-align: center;
		margin: 100rpx 0 50rpx;
		font-size: 28rpx;
		color: #7b7b7b;
		.img {
			width: 130rpx;
			height: 130rpx;
			border-radius: 20rpx;
		}
		.name {
			padding: 10rpx 0 ;
		}
		.version {
			
		}
	}
	.content {
		margin: 0 30rpx;
		.item {
			border-radius: 16rpx;
			background-color: #fff;
			display: flex;
			font-size: 28rpx;
			color: #7b7b7b;
			padding: 0 30rpx;
			height: 110rpx;
			align-items: center;
			.left {
				font-weight: 800;
				font-size: 28rpx;
			}
			.right {
				display: flex;
				align-items: center;
				margin-left: auto;
				color: #b4b4b4;
				font-size: 28rpx;
			}
		}
	}
	.copyright {
		width: 100%;
		text-align: center;
		font-size: 24rpx;
		color: #7b7b7b;
		position: fixed;
		bottom: 100rpx;
		left: 50%;
		transform: translate(-50%, 0);
	}
</style>
